Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

IF(odd, x, y, z, u) → P(x)
HALF(s(s(x))) → HALF(x)
IF(even, x, y, z, u) → HALF(z)
IF(odd, x, y, z, u) → TIMESITER(p(x), y, u)
TIMESITER(x, y, z) → IF(check(x), x, y, z, plus(z, y))
TIMESITER(x, y, z) → PLUS(z, y)
IF(even, x, y, z, u) → PLUS(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))
IF(even, x, y, z, u) → HALF(x)
IF(even, x, y, z, u) → TIMESITER(half(x), y, half(z))
IF(even, x, y, z, u) → TIMESITER(half(x), y, half(s(z)))
TIMES(x, y) → TIMESITER(x, y, 0)
IF(even, x, y, z, u) → HALF(s(z))
TIMESITER(x, y, z) → CHECK(x)
CHECK(s(s(s(x)))) → CHECK(s(x))
PLUS(s(x), y) → PLUS(x, y)

The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

IF(odd, x, y, z, u) → P(x)
HALF(s(s(x))) → HALF(x)
IF(even, x, y, z, u) → HALF(z)
IF(odd, x, y, z, u) → TIMESITER(p(x), y, u)
TIMESITER(x, y, z) → IF(check(x), x, y, z, plus(z, y))
TIMESITER(x, y, z) → PLUS(z, y)
IF(even, x, y, z, u) → PLUS(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))
IF(even, x, y, z, u) → HALF(x)
IF(even, x, y, z, u) → TIMESITER(half(x), y, half(z))
IF(even, x, y, z, u) → TIMESITER(half(x), y, half(s(z)))
TIMES(x, y) → TIMESITER(x, y, 0)
IF(even, x, y, z, u) → HALF(s(z))
TIMESITER(x, y, z) → CHECK(x)
CHECK(s(s(s(x)))) → CHECK(s(x))
PLUS(s(x), y) → PLUS(x, y)

The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 4 SCCs with 8 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PLUS(s(x), y) → PLUS(x, y)

The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


PLUS(s(x), y) → PLUS(x, y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(PLUS(x1, x2)) = (4)x_1   
POL(s(x1)) = 1 + (4)x_1   
The value of delta used in the strict ordering is 4.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

HALF(s(s(x))) → HALF(x)

The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


HALF(s(s(x))) → HALF(x)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(HALF(x1)) = (2)x_1   
POL(s(x1)) = 1 + x_1   
The value of delta used in the strict ordering is 4.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CHECK(s(s(s(x)))) → CHECK(s(x))

The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


CHECK(s(s(s(x)))) → CHECK(s(x))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(CHECK(x1)) = (4)x_1   
POL(s(x1)) = 2 + x_1   
The value of delta used in the strict ordering is 16.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

IF(even, x, y, z, u) → TIMESITER(half(x), y, half(s(z)))
IF(odd, x, y, z, u) → TIMESITER(p(x), y, u)
TIMESITER(x, y, z) → IF(check(x), x, y, z, plus(z, y))
IF(even, x, y, z, u) → TIMESITER(half(x), y, half(z))

The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


IF(even, x, y, z, u) → TIMESITER(half(x), y, half(s(z)))
IF(even, x, y, z, u) → TIMESITER(half(x), y, half(z))
The remaining pairs can at least be oriented weakly.

IF(odd, x, y, z, u) → TIMESITER(p(x), y, u)
TIMESITER(x, y, z) → IF(check(x), x, y, z, plus(z, y))
Used ordering: Polynomial interpretation [25,35]:

POL(plus(x1, x2)) = (1/4)x_1   
POL(half(x1)) = (1/4)x_1   
POL(zero) = 0   
POL(even) = 1/4   
POL(odd) = 0   
POL(check(x1)) = (1/2)x_1   
POL(s(x1)) = 1 + (4)x_1   
POL(p(x1)) = (1/4)x_1   
POL(0) = 0   
POL(IF(x1, x2, x3, x4, x5)) = 4 + (1/2)x_1 + x_2   
POL(TIMESITER(x1, x2, x3)) = 4 + (4)x_1   
The value of delta used in the strict ordering is 1/8.
The following usable rules [17] were oriented:

check(s(0)) → odd
check(0) → zero
check(s(s(s(x)))) → check(s(x))
check(s(s(0))) → even
half(s(0)) → 0
half(0) → 0
half(s(s(x))) → s(half(x))
p(s(x)) → x
p(0) → 0



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

IF(odd, x, y, z, u) → TIMESITER(p(x), y, u)
TIMESITER(x, y, z) → IF(check(x), x, y, z, plus(z, y))

The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


IF(odd, x, y, z, u) → TIMESITER(p(x), y, u)
TIMESITER(x, y, z) → IF(check(x), x, y, z, plus(z, y))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(plus(x1, x2)) = 4 + (3)x_1 + (1/2)x_2   
POL(zero) = 0   
POL(even) = 7/4   
POL(odd) = 1/4   
POL(check(x1)) = (1/2)x_1   
POL(p(x1)) = (1/4)x_1   
POL(s(x1)) = 1 + (4)x_1   
POL(0) = 0   
POL(IF(x1, x2, x3, x4, x5)) = (4)x_1 + (5/4)x_2   
POL(TIMESITER(x1, x2, x3)) = 1/4 + (4)x_1   
The value of delta used in the strict ordering is 1/4.
The following usable rules [17] were oriented:

check(s(0)) → odd
check(0) → zero
check(s(s(s(x)))) → check(s(x))
check(s(s(0))) → even
p(s(x)) → x
p(0) → 0



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

check(0) → zero
check(s(0)) → odd
check(s(s(0))) → even
check(s(s(s(x)))) → check(s(x))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(x, y) → timesIter(x, y, 0)
timesIter(x, y, z) → if(check(x), x, y, z, plus(z, y))
p(s(x)) → x
p(0) → 0
if(zero, x, y, z, u) → z
if(odd, x, y, z, u) → timesIter(p(x), y, u)
if(even, x, y, z, u) → plus(timesIter(half(x), y, half(z)), timesIter(half(x), y, half(s(z))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.